import Vue from 'vue'
import Vuex from 'vuex'
import mutations from './mutations'
import actions from './actions'
import getters from './getters'

Vue.use(Vuex)
//component==>actions==>mutations==>state==>component

const state = {
  // 购物车商品
  cartList: [],
  // 用户信息
  user: {},
  //订单信息
  orders: []
}
export default new Vuex.Store({
  state,
  mutations,
  getters,
  actions,
  modules: {}
})
